﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<ComeSeeThis_MVC2.Models.Vehicle>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    Vehicle Details
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <% Html.RenderPartial("SubMenu"); %>
    <h2>
        Vehicle Details</h2>
    <fieldset>
        <legend>
            <%: Model.VehicleName%></legend>
        <table>
            <tr>
                <th>
                    Company
                </th>
                <td>
                    <a href="/Company/Details/<%:Model.CompanyId %>">
                        <%: Model.Company.CompanyName%></a>
                </td>
            </tr>
            <tr>
                <th>
                    Vehicle Type
                </th>
                <td>
                    <a href="/VehicleType/Details/<%:Model.VehicleTypeId%>">
                        <%: Model.VehicleType.VehicleTypeName %></a>
                </td>
            </tr>
            <tr>
                <th>
                    VehicleName:
                </th>
                <td>
                    <%: Model.VehicleName %>
                </td>
            </tr>
            <tr>
                <th>
                    PartNumber:
                </th>
                <td>
                    <%: Model.PartNumber %>
                </td>
            </tr>
            <tr>
                <th>
                    Description:
                </th>
                <td>
                    <%: Model.Description %>
                </td>
            </tr>
            <tr>
                <th>
                    Weight:
                </th>
                <td>
                    <%: Model.Weight %>
                </td>
            </tr>
            <tr>
                <th>
                    TransmissionRatio:
                </th>
                <td>
                    <%: String.Format("{0:F}", Model.TransmissionRatio) %>
                </td>
            </tr>
        </table>
    </fieldset>
    <p>
        <%: Html.ActionLink("Back to List", "Index") %>
        <% if (User.Identity.IsAuthenticated)
           {%>
        |
        <%:Html.ActionLink("Edit", "Edit", new {id = Model.VehicleId})%>
        <%
            }%></p>
</asp:Content>
